﻿<html>
<head>
	<meta charset="UTF-8">
	<title>视频列表</title>
	<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
</head>
<body>
		<ul class="nav nav-tabs">
  			<li role="presentation"><a href="admin.php?c=user&m=listusers">用户列表</a></li>
  			<li role="presentation"><a href="admin.php?c=user&m=regUser">用户注册</a></li>
  			<li role="presentation"><a href="admin.php?c=music&m=listmusics">视频列表</a></li>
  			<li role="presentation"><a href="admin.php?c=music&m=regmusic">添加视频</a></li>
		</ul>
		<center><h2>视频列表(系统共<?php echo count($data['musics']); ?>个视频)</h2></center>
<div class="col-md-2"></div>
<div class="col-md-8 col-xs-12">
<table class="table table-hover">
<tr>
	<th>序号</th>
	<th>视频名称</th>
	<th>类别</th>
	<th>添加时间</th>
	<!-- <th>简介</th> -->
	<th>海报</th>
	<th>操作</th>
</tr>
<?php 
		foreach ($data['musics'] as $row) {
			?>
			<tr>
				<td><?php echo $row['mid'];?></td>
				<td><?php echo $row['musicname'];?></td>
				<td><?php 
						switch ($row['tid']) {
							case '1':echo "热门";break;
							case '2':echo "专辑";break;
							case '3':echo "艺人";break;
                            case '4':echo "风格";break;
                            case '5':echo "猜你喜欢";break;
							default:echo "其它";break;
								
							}
				?></td>
				<td><?php echo $row['uploaddate'];?></td>
				<!-- <td><?php echo $row['intro'];?></td> -->
				
				<td><img class="img-thumbnail" src="./photos/<?php echo $row['pic'];?>" width="80" alt="海报" title="<?php echo $row['intro']; ?>"></td>
				<td>
					<a href="admin.php?c=music&m=editmusic&mid=
					<?php echo $row['mid'];?>">修改</a> |
					<a href="admin.php?c=music&m=delmusic&mid=
					<?php echo $row['mid'];?>">删除</a>
				</td>
			</tr>
				<?php
		}

 ?>
</table>
</div>





		
</body>
</html>